package com.kamistoat.meimeistore.coupon.dao;

import com.kamistoat.meimeistore.coupon.entity.SeckillSessionEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 秒杀活动场次
 * 
 * @author kamistoat
 * @email linjianshanke@163.com
 * @date 2021-09-12 16:19:46
 */
@Mapper
public interface SeckillSessionDao extends BaseMapper<SeckillSessionEntity> {
    /**
     * 查询是否存在冲突的秒杀session
     * @param startTime
     * @param endTime
     * @return
     */
    List<Long> getClashSession(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
